//---------------------------------------------------------------------------
#ifndef uPrmMailH
#define uPrmMailH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "CForm.h"
#include <ExtCtrls.hpp>
#include "eic.h"
#include "IdBaseComponent.hpp"
#include "IdComponent.hpp"
#include "IdMessage.hpp"
#include "IdMessageClient.hpp"
#include "IdSMTP.hpp"
#include "IdTCPClient.hpp"
#include "IdTCPConnection.hpp"
#include <Mask.hpp>
#include "uChoixMl.h"
#include <Buttons.hpp>
//---------------------------------------------------------------------------

class TfrmParamMail : public CForm
{
__published:	// Composants gérés par l'EDI
  TGroupBox *gbParamCpt;
  TEdit *edSvrPOP;
  TEdit *edSvrSMTP;
  TEdit *edNomCompte;
  TEdit *edAdrEmail;
  TGroupBox *gbAdrDest;
  TPanel *Panel1;
  TBitBtn *btnValider;
  TBitBtn *btnAnnuler;
  TIdSMTP *smtpEnvoi;
  TIdMessage *msgCurrent;
  TMaskEdit *edPassword;
  TLabel *Label1;
  TComboBox *cbAdrDest;
  TGroupBox *gbBody;
  TEdit *edObject;
  TMemo *memBody;
  TBitBtn *btnParam;
  TLabel *Label2;
  TEdit *eDestinataire;
  TLabel *Label3;
  TLabel *Label4;
  TLabel *Label5;
  TLabel *Label6;
  TLabel *Label7;
  TLabel *Label8;
  TLabel *Label9;
  TLabel *Label10;
  TEdit *edPortPOP;
  TEdit *edPortSMTP;
  TLabel *lblPortPOP;
  TLabel *lblPortSMTP;
  void __fastcall btnValiderClick(TObject *Sender);
  void __fastcall smtpEnvoiWorkBegin(TObject *Sender,TWorkMode AWorkMode,const int AWorkCountMax);
  void __fastcall smtpEnvoiWork(TObject *Sender,TWorkMode AWorkMode,const int AWorkCount);
  void __fastcall btnParamClick(TObject *Sender);
  void __fastcall edPortPOPKeyPress(TObject *Sender, char &Key);
private:	// Déclarations utilisateur
  TParamMail *m_pMails;
  AnsiString  m_strPieceJointe;
  CBarre      m_eBarre;
  bool        m_bParametrage;
  bool        m_bDisplayBarre;
  AnsiString  m_strFichierIni;
  int m_Options;
  void       __fastcall AfficherParamCompteMail( bool bUseParam = true);
  int        __fastcall GetTotalAttachFile();
  void       __fastcall ResizeWindow( void);
public:		// Déclarations utilisateur
  __fastcall  TfrmParamMail( bool bParam, const AnsiString &strDestAddress, const AnsiString &strObject,
                             const AnsiString &strText, const AnsiString &strFileName,const AnsiString &EMailTechnique,const AnsiString &strFichierIni, int Options = OM_NONE, TComponent* Owner = NULL);
  __fastcall ~TfrmParamMail();

  bool __fastcall ParametrageEMailOk( EMAIL_TRANSFERT eTransfert);
};
//---------------------------------------------------------------------------
#endif
